3.2.4 \(\int e^x \cos (a+b x) \, dx\) [104]

Optimal. Leaf size=36 \[ \frac {e^x \cos (a+b x)}{1+b^2}+\frac {b e^x \sin (a+b x)}{1+b^2} \]

[Out]

exp(x)*cos(b*x+a)/(b^2+1)+b*exp(x)*sin(b*x+a)/(b^2+1)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {4518} \begin {gather*} \frac {b e^x \sin (a+b x)}{b^2+1}+\frac {e^x \cos (a+b x)}{b^2+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^x*Cos[a + b*x],x]

[Out]

(E^x*Cos[a + b*x])/(1 + b^2) + (b*E^x*Sin[a + b*x])/(1 + b^2)

Rule 4518

Int[Cos[(d_.) + (e_.)*(x_)]*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Simp[b*c*Log[F]*F^(c*(a + b*x))*(C
os[d + e*x]/(e^2 + b^2*c^2*Log[F]^2)), x] + Simp[e*F^(c*(a + b*x))*(Sin[d + e*x]/(e^2 + b^2*c^2*Log[F]^2)), x]
 /; FreeQ[{F, a, b, c, d, e}, x] && NeQ[e^2 + b^2*c^2*Log[F]^2, 0]

Rubi steps

\begin {align*} \int e^x \cos (a+b x) \, dx &=\frac {e^x \cos (a+b x)}{1+b^2}+\frac {b e^x \sin (a+b x)}{1+b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 26, normalized size = 0.72 \begin {gather*} \frac {e^x (\cos (a+b x)+b \sin (a+b x))}{1+b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^x*Cos[a + b*x],x]

[Out]

(E^x*(Cos[a + b*x] + b*Sin[a + b*x]))/(1 + b^2)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 35, normalized size = 0.97

method result size
default \(\frac {{\mathrm e}^{x} \cos \left (b x +a \right )}{b^{2}+1}+\frac {b \,{\mathrm e}^{x} \sin \left (b x +a \right )}{b^{2}+1}\) \(35\)
risch \(-\frac {i {\mathrm e}^{x} {\mathrm e}^{i b x} {\mathrm e}^{i a}}{2 \left (b -i\right )}+\frac {i {\mathrm e}^{x} {\mathrm e}^{-i b x} {\mathrm e}^{-i a}}{2 i+2 b}\) \(46\)
norman \(\frac {\frac {{\mathrm e}^{x}}{b^{2}+1}-\frac {{\mathrm e}^{x} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}+1}+\frac {2 b \,{\mathrm e}^{x} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}+1}}{1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )}\) \(71\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x)*cos(b*x+a),x,method=_RETURNVERBOSE)

[Out]

exp(x)*cos(b*x+a)/(b^2+1)+b*exp(x)*sin(b*x+a)/(b^2+1)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 25, normalized size = 0.69 \begin {gather*} \frac {{\left (b \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} e^{x}}{b^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*cos(b*x+a),x, algorithm="maxima")

[Out]

(b*sin(b*x + a) + cos(b*x + a))*e^x/(b^2 + 1)

________________________________________________________________________________________

Fricas [A]
time = 2.18, size = 28, normalized size = 0.78 \begin {gather*} \frac {b e^{x} \sin \left (b x + a\right ) + \cos \left (b x + a\right ) e^{x}}{b^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*cos(b*x+a),x, algorithm="fricas")

[Out]

(b*e^x*sin(b*x + a) + cos(b*x + a)*e^x)/(b^2 + 1)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.24, size = 114, normalized size = 3.17 \begin {gather*} \begin {cases} - \frac {i x e^{x} \sin {\left (a - i x \right )}}{2} + \frac {x e^{x} \cos {\left (a - i x \right )}}{2} + \frac {e^{x} \cos {\left (a - i x \right )}}{2} & \text {for}\: b = - i \\\frac {i x e^{x} \sin {\left (a + i x \right )}}{2} + \frac {x e^{x} \cos {\left (a + i x \right )}}{2} - \frac {i e^{x} \sin {\left (a + i x \right )}}{2} & \text {for}\: b = i \\\frac {b e^{x} \sin {\left (a + b x \right )}}{b^{2} + 1} + \frac {e^{x} \cos {\left (a + b x \right )}}{b^{2} + 1} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*cos(b*x+a),x)

[Out]

Piecewise((-I*x*exp(x)*sin(a - I*x)/2 + x*exp(x)*cos(a - I*x)/2 + exp(x)*cos(a - I*x)/2, Eq(b, -I)), (I*x*exp(
x)*sin(a + I*x)/2 + x*exp(x)*cos(a + I*x)/2 - I*exp(x)*sin(a + I*x)/2, Eq(b, I)), (b*exp(x)*sin(a + b*x)/(b**2
 + 1) + exp(x)*cos(a + b*x)/(b**2 + 1), True))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 33, normalized size = 0.92 \begin {gather*} {\left (\frac {b \sin \left (b x + a\right )}{b^{2} + 1} + \frac {\cos \left (b x + a\right )}{b^{2} + 1}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*cos(b*x+a),x, algorithm="giac")

[Out]

(b*sin(b*x + a)/(b^2 + 1) + cos(b*x + a)/(b^2 + 1))*e^x

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 25, normalized size = 0.69 \begin {gather*} \frac {{\mathrm {e}}^x\,\left (\cos \left (a+b\,x\right )+b\,\sin \left (a+b\,x\right )\right )}{b^2+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)*exp(x),x)

[Out]

(exp(x)*(cos(a + b*x) + b*sin(a + b*x)))/(b^2 + 1)

________________________________________________________________________________________